package com.lf.constant;

import java.math.BigDecimal;
import java.util.concurrent.locks.ReentrantReadWriteLock;

public interface ConstantsValue {

    //单服务  提现读写锁
    ReentrantReadWriteLock DRAWN_LOCK = new ReentrantReadWriteLock ();
    //集群服务（分布式锁） 提现读写锁
    String COLONY_DRAWN_LOCK = "colonyDrawnLock";


    //redis lock key
    String RedisLockRegistryKey = "redis-lock-registry-key";
    /**
     * JWT认证用的KEY
     */
    String JWT_SECRET = "jwt&MiniProgram";
    // jwt中ars秘钥key
    String JWT_KEY = "jwt&MiniProgram";
    // 发行人
    String JWT_ISSUER = "JCMiniProgram";

    /**
     * MD5加盐
     */
    String MD5_SALT_TOKEN = "JCXCX";

    /**
     * 编码
     */
    String ENCODING_FORMAT_UTF8 = "UTF-8";

    /**
     * 用户token前缀
     */
    String TOKEN_REDIS_KEY = "JCToken:";

    /**
     * 管理员token前缀
     */
    String TOKEN_MANAGER_KEY = "ManagerToken:";

    /**
     * 微信全局配置 redis key
     */
    String WX_COFIG = "WxConfig:";

    /**
     * 認證短信验证码
     */
    String VERIFICATION_CODE = "VerificationCode:";

    /**
     * TOKEN过期时间30天
     */
    int TOKEN_EXPIRES_HOUR = 60 * 60 * 24 * 30;
    /**
     * TOKEN过期时间30分钟
     */
    int TOKEN_EXPIRES_HOUR_10 = 60 * 30;


    String SUCCESS = "SUCCESS";
    String FAIL = "FAIL";

    String FACK_ADD = "https://hehe-1253111109.cos.ap-guangzhou.myqcloud.com/";

    /*判断系统是否windows*/
    boolean isWindows = System.getProperty("os.name").toLowerCase().contains("win");

    /**
     * 微信获取openid请求接口
     */
    String WX_GET_OPENID = "https://api.weixin.qq.com/sns/jscode2session";


    Integer STATUS_DEL = 1;//删除
    Integer STATUS_NO_DEL = 0;//不删除

    Integer STATUS_PAY = 1;//已支付
    Integer STATUS_NO_PAY = 0;//未支付

    Integer STATUS_AGENT = 1;//代理
    Integer STATUS_NO_AGENT = 0;//非代理

    Integer STATUS_BLACK = 1;//拉黑
    Integer STATUS_NO_BLACK = 0;//非拉黑

    //对应“个人”和“平台”
    Integer STATUS_DRAWN = 0;//可提现
    Integer STATUS_NO_DRAWN = 1;//禁止提现

    String CLOSE_PAY = "1";//关闭核查收费
    String OPEN_PAY = "0";//开通核查收费


    BigDecimal ONEHUNRAY = new BigDecimal("100");
    BigDecimal PRESENT_90 = new BigDecimal("0.9");//代理商佣金90%
    BigDecimal PRESENT_20 = new BigDecimal("0.2");//普通用户佣金20%

    //小数点后几位
    Integer SCALE_1 = 1;
    Integer SCALE_2 = 2;Integer SCALE_3 = 3;
    Integer SCALE_4 = 4;

    Integer FEE_TYPE_CHECK = 1;//月度核查费用项目
    Integer FEE_TYPE_CON = 2;//核查续费项目
    Integer FEE_TYPE_DIS = 3;//代理商费用

    String CHECK_FEE = "核查比对费用-移动支付";
    String CHECK_FEE_2 = "核查比对续费-移动支付";
    String DIS_FEE = "代理商加盟费用-移动支付";

    Long TIME_ONE_DAY = 24 * 60 * 60 * 1000L;
    Long TIME_ONE_MOUTH = 30 * 24 * 60 * 60 * 1000L;
    Long TIME_FIVE_YEAR = 5 * 12 * 30 * 24 * 60 * 60 * 1000L;

    String CLIENT_IP = "106.55.147.43";
    String TRADE_TYPE = "JSAPI";
    String SIGN_TYPE = "MD5";


    //审核：0：未审核，1：通过，2：不通过
    Integer NO_EXAMINE = 0;
    Integer EXAMINE_OK = 1;
    Integer EXAMINE_NO_OK = 2;

    //是否已实名认证，0：未实名，1：已实名， 2：审核中, 3:审核未通过
    Integer NO_AUTH = 0;
    Integer AUTH_OK = 1;
    Integer AUTH_ING = 2;
    Integer AUTH_NO_OK = 3;

    String GRANT_TYPE =  "authorization_code";
    String NO_CHECK = "NO_CHECK";
    String FORCE_CHECK = "FORCE_CHECK";
    String AMOUNT_LIMIT = "AMOUNT_LIMIT";

    //吐槽状态
    Integer STATUS_EXAMINE = 0;//审核中
    Integer STATUS_TRUE = 1;//通过
    Integer STATUS_FALSE = 2;//不通过

    //小程序审核助手
    Integer  OPEN_CO  = 1;//开启审核助手
    Integer  CLOSE_CO  = 0;//关闭审核助手

    String VOICE_STR = "微信用户支付到账s%元";
    Short AUTO_TRANSFER = 0;//调用微信企业付款接口自动付款
    Short MANUAL_TRANSFER = 1;//记录提现申请，手动给用户提现

    String NET_PATH = "https://mp.kxkj.site/mp/qrcode/UID.jpg";
    String SHARE_URL = "https://mp.kxkj.site/mp/jump?pid=PID";
    String FILE_PATH =  "/usr/local/nginx/html/mp/qrcode/UID.jpg";
    double RMB100 = 100D;//提现金额不得低于100
    double RMB10000 = 10000D;//提现金额不得高于10000
}
